import request from '@/utils/request'

// api地址
const api = {
  register: '/register1',
  login: '/login1',
  index: '/api/index',
  list: '/api/list',
  addLeave: '/api/add',
  listLeave: '/api/listLeave'
}

// 用户注册
export function register(data) {
  return request.post(api.register, data)
}

export function login(data) {
  return request.post(api.login, data)
}
export function index(data) {
  return request.get(api.index, data)
}
export function list(data) {
  return request.get(api.list, data)
}
export function addLeave(data) {
  return request.post(api.addLeave, data)
}
export function listLeave(data) {
  return request.post(api.listLeave, data)
}